<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: a
  Date: 2024/3/22
  Time: 8:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Login</title>
    <c:if test="${param.info=='unLogin'}">
        <script>alert("登录失败,请检查您的用户名和密码!")</script>
    </c:if>
    <c:if test="${param.info=='unRegister'}">
        <script>alert("您已注册,请登录")</script>
    </c:if>
</head>
<body>
<h2>Hello World!</h2>
<h3>未登录,请先登录</h3>
<form name="form1" method="post" action="UserServlet">
    <input type="hidden" name="action" value="login">
    用户名:<input name="username" type="text"><br>
    密码: <input name="password" type="password"><br>
    <input type="submit" name="submit1" value="提交">
    <input type="reset" name="submit2" value="重置">
</form>
<h3>没有注册?快来加入我们吧!</h3>
<%--<form name="form1" method="post" action="register.jsp">--%>
<form name="form2" method="post" action="UserServlet">
    <input type="hidden" name="action" value="register">
    用户名:<input name="username" type="text"><br>
    密码: <input name="password" type="password"><br>
    <input type="submit" name="submit1" value="提交">
    <input type="reset" name="submit2" value="重置">
</form>
</body>
</html>
